package com.twang.stock.task;

import com.alibaba.fastjson.JSONObject;
import com.twang.stock.entity.DfcfBanKuaiMaoLiLv;
import com.twang.stock.entity.ReDianHotRank;
import com.twang.stock.entity.ThsHotStock;
import com.twang.stock.entity.ThsReDianStock;
import com.twang.stock.mapper.ReDianHotRankMapper;
import com.twang.stock.mapper.ThsReDianStockMapper;
import com.twang.stock.redis.RedisUtil;
import com.twang.stock.service.ThsReDianStockService;
import com.twang.stock.service.TodayReDuOnehourService;
import com.twang.stock.service.jinyan.CommonService;
import com.twang.stock.email.SendmailService;
import com.twang.stock.strategy.WarnVipNewsService;
import com.twang.stock.task.old.BaseTask;
import com.twang.stock.threadPool.AsycTaskExecutorConfig;
import com.twang.stock.utils.date.HolidayCopy;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.assertj.core.util.Lists;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * 同花顺1小时热度榜（）
 */
@Slf4j
@Component
public class TodayReDuOnehourTask{

    @Autowired
    private TodayReDuOnehourService todayReDuOnehourService;

    @Autowired
    private WarnVipNewsService warnVipNewsService;

    @Autowired
    private AsycTaskExecutorConfig asycTaskExecutorConfig;
   @Scheduled(cron = "0 0/10 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * ? ")
    public void excute() throws Exception {
       asycTaskExecutorConfig.taskQueueExecutor().execute(() -> {
           try {
               todayReDuOnehourService.excute();
           } catch (Exception e) {
               log.info("error = {}", e);
           }
           log.info("==========> 消息刷新  TodayReDuOnehourTask end!");
       });
   }




}
